home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / PInterfaces / FixMath.p < prev    next >
Encoding:
Text File  |  1989-10-13  |  1.2 KB  |  59 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Saturday, October 15, 1988 at 8:43 AM
  3.     FixMath.p
  4.     Pascal Interface to Fixed Point Math
  5.  
  6.     Copyright Apple Computer, Inc.    1985-1988
  7.     All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT FixMath;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingFixMath}
  21. {$SETC UsingFixMath := 1}
  22.  
  23. {$I+}
  24. {$SETC FixMathIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$SETC UsingIncludes := FixMathIncludes}
  30.  
  31.  
  32. FUNCTION Fix2Frac(x: Fixed): Fract;
  33.     INLINE $A841;
  34. FUNCTION Fix2Long(x: Fixed): LONGINT;
  35.     INLINE $A840;
  36. FUNCTION FixATan2(x: LONGINT;y: LONGINT): Fixed;
  37.     INLINE $A818;
  38. FUNCTION Long2Fix(x: LONGINT): Fixed;
  39.     INLINE $A83F;
  40. FUNCTION Frac2Fix(x: Fract): Fixed;
  41.     INLINE $A842;
  42. FUNCTION Frac2X(x: Fract): Extended;
  43. FUNCTION Fix2X(x: Fixed): Extended;
  44. FUNCTION X2Fix(x: Extended): Fixed;
  45. FUNCTION X2Frac(x: Extended): Fract;
  46. FUNCTION FracMul(x: Fract;y: Fract): Fract;
  47. FUNCTION FixDiv(x: Fixed;y: Fixed): Fixed;
  48. FUNCTION FracDiv(x: Fract;y: Fract): Fract;
  49. FUNCTION FracSqrt(x: Fract): Fract;
  50. FUNCTION FracSin(x: Fixed): Fract;
  51. FUNCTION FracCos(x: Fixed): Fract;
  52.  
  53. {$ENDC}    { UsingFixMath }
  54.  
  55. {$IFC NOT UsingIncludes}
  56.     END.
  57. {$ENDC}
  58.  
  59.